@extends('layout.admin')
@section('content')
<div class="graphs">
	<h3 class="blank1">添加分类</h3>
		<div class="tab-content">
		<div class="tab-pane active" id="horizontal-form">
			<form class="form-horizontal" action="/cate/insert" method="post" enctype="multiple">
			@if (count($errors) > 0)
	            <div class="mws-form-message warning">
	                @foreach ($errors->all() as $error)
	                {{$error}}<br>
	                @endforeach
	            </div>
	        @endif
				<div class="form-group">
					<label for="focusedinput" class="col-sm-2 control-label">分类名称</label>
					<div class="col-sm-4">
						<input class="form-control1" id="focusedinput" name="name" placeholder="请输入分类名称" type="text">
					</div>
				</div>
				
				<div class="form-group">
					<label for="selector1" class="col-sm-2 control-label">父级分类</label>
					<div class="col-sm-4">
						<select id="catelist" name="pid" class="form-control1">
							<option value="0">分类层级</option>
							@foreach($cate as $k=>$v)
								<option value="{{$v->pid}}">{{$v->name}}</option>
							@endforeach
						</select>
					</div>
				</div>
				
				<div class="panel-footer">
					<div class="row">
						<div class="col-md-8 col-sm-offset-2">
							<button class="btn-success btn">添加</button>
						</div>
					</div>
			 	</div>
			 	{{csrf_field()}}
			</form>
		</div>
	</div>
</div>
@endsection